/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package vn.com.fis.portal.vtcc.model.impl;

import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.CacheModel;

import vn.com.fis.portal.vtcc.model.SampleEntry;

import java.io.Serializable;

import java.util.Date;

/**
 * The cache model class for representing SampleEntry in entity cache.
 *
 * @author loind
 * @see SampleEntry
 * @generated
 */
public class SampleEntryCacheModel implements CacheModel<SampleEntry>,
	Serializable {
	@Override
	public String toString() {
		StringBundler sb = new StringBundler(91);

		sb.append("{sampleId=");
		sb.append(sampleId);
		sb.append(", scientificName=");
		sb.append(scientificName);
		sb.append(", sampleSynonym=");
		sb.append(sampleSynonym);
		sb.append(", eCatalog=");
		sb.append(eCatalog);
		sb.append(", sampleCode=");
		sb.append(sampleCode);
		sb.append(", catalogYear=");
		sb.append(catalogYear);
		sb.append(", otherName=");
		sb.append(otherName);
		sb.append(", sampleOtherCode=");
		sb.append(sampleOtherCode);
		sb.append(", sourceIsolation=");
		sb.append(sourceIsolation);
		sb.append(", history=");
		sb.append(history);
		sb.append(", sampleForeign=");
		sb.append(sampleForeign);
		sb.append(", domestic=");
		sb.append(domestic);
		sb.append(", deposit=");
		sb.append(deposit);
		sb.append(", isolationMethod=");
		sb.append(isolationMethod);
		sb.append(", isolationTime=");
		sb.append(isolationTime);
		sb.append(", depositionTime=");
		sb.append(depositionTime);
		sb.append(", isolationPerson=");
		sb.append(isolationPerson);
		sb.append(", fd=");
		sb.append(fd);
		sb.append(", df=");
		sb.append(df);
		sb.append(", sampleLN=");
		sb.append(sampleLN);
		sb.append(", cultivationMedium=");
		sb.append(cultivationMedium);
		sb.append(", cultivationTemperature=");
		sb.append(cultivationTemperature);
		sb.append(", pH=");
		sb.append(pH);
		sb.append(", mostRecentCheckingDate=");
		sb.append(mostRecentCheckingDate);
		sb.append(", survivability=");
		sb.append(survivability);
		sb.append(", typeStrain=");
		sb.append(typeStrain);
		sb.append(", naturalStrain=");
		sb.append(naturalStrain);
		sb.append(", mutatedStrain=");
		sb.append(mutatedStrain);
		sb.append(", productionStrain=");
		sb.append(productionStrain);
		sb.append(", cellMorphology=");
		sb.append(cellMorphology);
		sb.append(", cellPhoto=");
		sb.append(cellPhoto);
		sb.append(", colonyPhoto=");
		sb.append(colonyPhoto);
		sb.append(", sporePhoto=");
		sb.append(sporePhoto);
		sb.append(", sequences=");
		sb.append(sequences);
		sb.append(", growthCondition=");
		sb.append(growthCondition);
		sb.append(", quinone=");
		sb.append(quinone);
		sb.append(", GCContent=");
		sb.append(GCContent);
		sb.append(", otherCharacteristics=");
		sb.append(otherCharacteristics);
		sb.append(", applications=");
		sb.append(applications);
		sb.append(", sampleReferences=");
		sb.append(sampleReferences);
		sb.append(", createDate=");
		sb.append(createDate);
		sb.append(", updateDate=");
		sb.append(updateDate);
		sb.append(", biosafety=");
		sb.append(biosafety);
		sb.append(", status=");
		sb.append(status);
		sb.append(", strainId=");
		sb.append(strainId);
		sb.append("}");

		return sb.toString();
	}

	public SampleEntry toEntityModel() {
		SampleEntryImpl sampleEntryImpl = new SampleEntryImpl();

		sampleEntryImpl.setSampleId(sampleId);

		if (scientificName == null) {
			sampleEntryImpl.setScientificName(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setScientificName(scientificName);
		}

		if (sampleSynonym == null) {
			sampleEntryImpl.setSampleSynonym(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setSampleSynonym(sampleSynonym);
		}

		sampleEntryImpl.setECatalog(eCatalog);

		if (sampleCode == null) {
			sampleEntryImpl.setSampleCode(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setSampleCode(sampleCode);
		}

		if (catalogYear == null) {
			sampleEntryImpl.setCatalogYear(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setCatalogYear(catalogYear);
		}

		if (otherName == null) {
			sampleEntryImpl.setOtherName(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setOtherName(otherName);
		}

		if (sampleOtherCode == null) {
			sampleEntryImpl.setSampleOtherCode(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setSampleOtherCode(sampleOtherCode);
		}

		if (sourceIsolation == null) {
			sampleEntryImpl.setSourceIsolation(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setSourceIsolation(sourceIsolation);
		}

		if (history == null) {
			sampleEntryImpl.setHistory(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setHistory(history);
		}

		sampleEntryImpl.setSampleForeign(sampleForeign);
		sampleEntryImpl.setDomestic(domestic);
		sampleEntryImpl.setDeposit(deposit);

		if (isolationMethod == null) {
			sampleEntryImpl.setIsolationMethod(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setIsolationMethod(isolationMethod);
		}

		if (isolationTime == null) {
			sampleEntryImpl.setIsolationTime(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setIsolationTime(isolationTime);
		}

		if (depositionTime == null) {
			sampleEntryImpl.setDepositionTime(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setDepositionTime(depositionTime);
		}

		if (isolationPerson == null) {
			sampleEntryImpl.setIsolationPerson(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setIsolationPerson(isolationPerson);
		}

		if (fd == null) {
			sampleEntryImpl.setFd(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setFd(fd);
		}

		if (df == null) {
			sampleEntryImpl.setDf(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setDf(df);
		}

		if (sampleLN == null) {
			sampleEntryImpl.setSampleLN(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setSampleLN(sampleLN);
		}

		if (cultivationMedium == null) {
			sampleEntryImpl.setCultivationMedium(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setCultivationMedium(cultivationMedium);
		}

		if (cultivationTemperature == null) {
			sampleEntryImpl.setCultivationTemperature(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setCultivationTemperature(cultivationTemperature);
		}

		if (pH == null) {
			sampleEntryImpl.setPH(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setPH(pH);
		}

		if (mostRecentCheckingDate == Long.MIN_VALUE) {
			sampleEntryImpl.setMostRecentCheckingDate(null);
		}
		else {
			sampleEntryImpl.setMostRecentCheckingDate(new Date(
					mostRecentCheckingDate));
		}

		if (survivability == null) {
			sampleEntryImpl.setSurvivability(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setSurvivability(survivability);
		}

		sampleEntryImpl.setTypeStrain(typeStrain);
		sampleEntryImpl.setNaturalStrain(naturalStrain);
		sampleEntryImpl.setMutatedStrain(mutatedStrain);
		sampleEntryImpl.setProductionStrain(productionStrain);

		if (cellMorphology == null) {
			sampleEntryImpl.setCellMorphology(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setCellMorphology(cellMorphology);
		}

		if (cellPhoto == null) {
			sampleEntryImpl.setCellPhoto(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setCellPhoto(cellPhoto);
		}

		if (colonyPhoto == null) {
			sampleEntryImpl.setColonyPhoto(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setColonyPhoto(colonyPhoto);
		}

		if (sporePhoto == null) {
			sampleEntryImpl.setSporePhoto(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setSporePhoto(sporePhoto);
		}

		if (sequences == null) {
			sampleEntryImpl.setSequences(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setSequences(sequences);
		}

		if (growthCondition == null) {
			sampleEntryImpl.setGrowthCondition(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setGrowthCondition(growthCondition);
		}

		if (quinone == null) {
			sampleEntryImpl.setQuinone(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setQuinone(quinone);
		}

		if (GCContent == null) {
			sampleEntryImpl.setGCContent(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setGCContent(GCContent);
		}

		if (otherCharacteristics == null) {
			sampleEntryImpl.setOtherCharacteristics(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setOtherCharacteristics(otherCharacteristics);
		}

		if (applications == null) {
			sampleEntryImpl.setApplications(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setApplications(applications);
		}

		if (sampleReferences == null) {
			sampleEntryImpl.setSampleReferences(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setSampleReferences(sampleReferences);
		}

		if (createDate == Long.MIN_VALUE) {
			sampleEntryImpl.setCreateDate(null);
		}
		else {
			sampleEntryImpl.setCreateDate(new Date(createDate));
		}

		if (updateDate == Long.MIN_VALUE) {
			sampleEntryImpl.setUpdateDate(null);
		}
		else {
			sampleEntryImpl.setUpdateDate(new Date(updateDate));
		}

		if (biosafety == null) {
			sampleEntryImpl.setBiosafety(StringPool.BLANK);
		}
		else {
			sampleEntryImpl.setBiosafety(biosafety);
		}

		sampleEntryImpl.setStatus(status);
		sampleEntryImpl.setStrainId(strainId);

		sampleEntryImpl.resetOriginalValues();

		return sampleEntryImpl;
	}

	public long sampleId;
	public String scientificName;
	public String sampleSynonym;
	public int eCatalog;
	public String sampleCode;
	public String catalogYear;
	public String otherName;
	public String sampleOtherCode;
	public String sourceIsolation;
	public String history;
	public int sampleForeign;
	public int domestic;
	public int deposit;
	public String isolationMethod;
	public String isolationTime;
	public String depositionTime;
	public String isolationPerson;
	public String fd;
	public String df;
	public String sampleLN;
	public String cultivationMedium;
	public String cultivationTemperature;
	public String pH;
	public long mostRecentCheckingDate;
	public String survivability;
	public int typeStrain;
	public int naturalStrain;
	public int mutatedStrain;
	public int productionStrain;
	public String cellMorphology;
	public String cellPhoto;
	public String colonyPhoto;
	public String sporePhoto;
	public String sequences;
	public String growthCondition;
	public String quinone;
	public String GCContent;
	public String otherCharacteristics;
	public String applications;
	public String sampleReferences;
	public long createDate;
	public long updateDate;
	public String biosafety;
	public int status;
	public long strainId;
}